import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class Demo6 {
    public static void main(String[] args) {
        try(Writer writer = new FileWriter("./test2.txt",true)) {
            //也是默认会清空
            writer.write("你好世界你好世界");
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
